#pragma once
#include "UIBase.h"
class GWnd : public GUIBase
{
public:
	GWnd(void);
	virtual void	HandleMessage(UINT uMsg, int wParam, int lParam);
	virtual void LoadResAttritute(map<tstring, tstring>& mapAtt);
	DWORD HandleEvent(DWORD hwnd);
	void ShowWnd(int nType);
	void SetParent(GUIBase* pBase);
	void SetParentWndPos(int left, int button);
	void SetText(const wchar_t* sz);
	bool IsPointInWnd(int x, int y);
	virtual void Update();
	virtual void Draw() = 0;
	virtual void MouseMove(int x, int y,int wParam=0);
	virtual void MouseClick(int button, int state, int x, int y);
	~GWnd(void);
protected:
	int m_nRight;
	int m_nBotton;
	int m_nLeft;
	int m_nTop;
	int m_nParentLeft, m_nParentBotton;
	int nShowType;
	int	nState;
protected:
	GFont	m_font;
	wstring m_strText;
	BOOL	m_bFocus;
	GUIBase* m_pParentWnd;
};